<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta content="票务,演出订票" name="keywords">
<meta content="【永乐票务】票务网提供最新、最全月演出信息，包括演唱会，音乐会，歌剧、话剧、体育、儿童剧等演出订票，方便您在线订演出票，您最佳的票务中心。" name="description">
<meta http-equiv="X-UA-Compatible" content="IE=7;IE=8;IE=9;IE=edge;chrome=1" />
<!-- 引入公共css资源 -->
<%include("/common/head.html",{}){}%>
<title>【票务演出票务演出订票票务网】_永乐票务_确认订单信息_立即购买</title>
<link type="text/css" href="${staticPath}/css/order/order.css" rel="stylesheet">
<script type="text/javascript" src="${staticPath}/js/order/jquery-1.7.2.js"></script>
<script type="text/javascript" src="${staticPath}/js/order/public-min.js"></script> 
<script type="text/javascript" src="${staticPath}/js/order/buyProcess.js"></script>	
<script type="text/javascript" src="${staticPath}/js/customer/customerAddress.js"></script>
<script type="text/javascript" src="${staticPath}/js/order/orderBuyNow.js"></script>
<script type="text/javascript" src="${staticPath}/js/order/saveGeneralOrder.js"></script>	
<script type="text/javascript" src="${staticPath}/js/json2.js"></script>
</head>
<body>
<!-- 引入 top导航条 -->
<div id="top_ajax" class="top-w"></div>
<!-- 引入搜索框 -->
<%include("/common/search.html",{}){}%>
<!-- 引入菜单导航 -->
<%include("/common/navPro.html",{}){}%>
<!-- <script type="text/javascript" src="${staticPath}/js/top_ajax.js${version}"></script> -->
<p class="buyCar-title">首页 > 我的永乐 > 确认订单信息</p>
<input type="hidden" id="run1" value=""/><!--采购信息 -->
<input type="hidden" name="products" id="products" value="${products}"/><!--采购信息 -->
<input type="hidden" name="cityName" id="cityName" value="${cityName}"/><!--城市名称 -->
<input type="hidden" name="shipment" id="shipment" value="0"/><!-- 配送方式 -->
<input type="hidden" name="tickets" id="tickets" value="${sd}"/><!-- 商品参数sd -->
<input type="hidden" name="quickBuyType" id="quickBuyType" value="${quickBuyType}"/><!-- 购买类型 -->
<input type="hidden" name="productid" id="productid" value="${productId}"/><!-- 商品ID -->
<input type="hidden" name="fconfigid" id="fconfigid" value="${fconfigId}"/><!-- 分站ID -->
<input type="hidden" name="cityid" id="cityid" value="${cityId}"/><!-- 城市ID -->
<input type="hidden" name="playDate" id="playDate" value="${playDate}"/><!-- 演出时间 -->
<input type="hidden" name="subtotalval" id="subtotalval" value="${yTotal}"/><!-- 订单总金额，打折后 -->
<input type="hidden" name="freightVal" id="freightVal" value="0"/><!-- 运费 -->
<input type="hidden" name="premiumVal" id="premiumVal" value="${premiumVal}"/><!-- 保费 -->
<input type="hidden" name="truebuy" id="truebuy" value="${truebuy}"/><!-- 实名购买参数 -->
<input type="hidden" name="identityNum" id="identityNum" value="${identityNum}"/><!-- 实名购买参数证件张数 -->
<input type="hidden" name="papersType" id="papersType" value="${papersType}"/><!--  0 只支持身份证 1 只支持护照 2 支持身份证、护照 -->
<input type="hidden" name="cashcouponinfoid" id="cashcouponinfoid" value="0"/> <!-- 现金券ID -->
<input type="hidden" name="cashCouponVal" id="cashCouponVal" value="0"/> <!-- 现金券金额 -->
<input type="hidden" name="useRenewal" id="useRenewal" value="0"/> <!-- 使用预存款金额 -->
<input type="hidden" name="addressId" id="addressId" value="0"/> <!-- 地址ID -->
<input type="hidden" name="payId" id="payId" value="0"/> <!-- 支付ID -->
<input type="hidden" name="isLtk" id="isLtk" value="0"/> <!-- 是否使用乐通卡 -->
<input type="hidden" name="ltk_no" id="ltk_no" value="0"/> <!-- 乐通卡号 -->
<input type="hidden" name="ltk_pwd" id="ltk_pwd" value="0"/> <!-- 乐通卡密码 -->
<input type="hidden" name="weiUrl" id="weiUrl" value="${path}/payNew/weiXinPay?"/> <!-- 微信支付返回地址 -->
<input type="hidden" name="payUrl" id="payUrl" value="${ylpwpath}/pay/paysucc.html?"/> <!-- 普通支付返回地址 -->
<input type="hidden" name="cashUrl" id="cashUrl" value="${ylpwpath}/pay/successBuy.html?"/> <!-- 货到付款返回地址 -->
<input type="hidden" name="mask" id="mask" value="${shadeCodeInfo}"/> <!-- 遮罩码拼接 -->
<input type="hidden" name="unionIdVal" id="unionIdVal" value="${unionId}"/> <!-- 联盟ID -->
<input type="hidden" name="orderSourceVal" id="orderSourceVal" value="${orderSource}"/> <!-- 订单来源 -->
<input type="hidden" name="unionnameVal" id="unionnameVal" value="${unionname}"/> <!-- 推广来源 -->
<input type="hidden" name="companyinfoVal" id="companyinfoVal" value="${companyinfo}"/> <!-- 内部备注  "@" + unionmsg + "@" -->
<input type="hidden" name="tgeVal" id="tgeVal" value="${tge}"/> <!-- 推广来源自定义SEM -->
<input type="hidden" name="isInsured" id="isInsured" value="${product.insured}"/> <!-- 商品是否支持退票保险0不支持1支持-->
<input type="hidden" name="isDifferTime" id="isDifferTime" value="${isDifferTime}"/> <!-- 是否演出前三天 0否 1是-->
<input type="hidden" id="customerId"  value="${customer.customersId}"/> 

<form id="orderForm" action="${path}/saveNewOrder"  method="post" onsubmit="unClick();">
<input type="hidden" name="o['type']" value="general"/> <!-- 订单类型 -->
<input type="hidden" name="o['origin']" value="1"/> <!--订单来源 -->
<input type="hidden" name="o['addressid']" id="oAddressId" value="0"/> <!-- 地址ID -->
<input type="hidden" name="o['customerid']"  value="${customer.customersId}"/> <!-- 用户ID -->
<input type="hidden" name="o['tickets']"  value="${newProInfo}"/> <!-- tickets -->
<input type="hidden" name="o['purchases']" id="purchases" value="0"/> <!-- 采购信息 -->
<input type="hidden" name="o['payid']" id="oPayid" value="0"/> <!-- 支付ID -->
<input type="hidden" name="o['callbackurl']" id="callbackurl" value="${ylpwpath}/pay/paysucc.html?"/> <!-- 返回页 -->
<input type="hidden" name="o['errorurl']" id="errorurl" value="${path}/nqt/common/error"/> <!-- 错误页 -->
<input type="hidden" name="o['isRedirect']" id="isRedirect" value="1"/> <!-- 订单接口跳转标示 1为跳转，0或空为不跳转 -->
<input type="hidden" name="o['orderUrl']" id="orderUrl" value="${orderUrl}"/>
<input type="hidden" name="o['productId']" value="${productId}"/><!-- 商品ID -->

<input type="hidden" name="o['bankcardno']" id="bankcardno" value="0"/>
<input type="hidden" name="o['verifycode']" id="verifycode" value="0"/>
</form>



<div class="orderSure clearfloat">
	<div class="buyCar-hedpic">
		<img src="${staticPath}/images/order/buyProcess-1.jpg" />
	</div>
	<p class="orderSure-title">
    	<span>确认送货方式</span>
    </p>
    <div class="orderSure-sendStyles clearfloat">
    	<table class="orderSure-sendStyles-tab">
    		<tr>
    			<%if(expressFlag == 1){%>
    			<td width="35"><input type="radio" name="sendStyle" value="1" rel="0" onclick="clickExpress();"/></td>
    			<td class="orderSure-sendStyles-pad">
    				<a href="javascript:void(0)" class="orderSure-senda" rel="0" onclick="clickExpress();"></a>
    				<p>快递配送</p>
    			</td>
    			<%}%>
    			<%if(selfGetFlag == 1){%>
    			<td width="35"><input type="radio" name="sendStyle" value="2" rel="1" onclick="clickDoor();" id="doorRadio"/></td>
    			<td class="orderSure-sendStyles-pad">
    				<a href="javascript:void(0)" class="orderSure-sendb" rel="1" onclick="clickDoor();"></a>
    				<p>上门自取</p>
    			</td>
    			<%}%>
    		</tr>
    	</table>
    </div>
	<p class="orderSure-title">
    	<span>确认收货人信息</span>
    </p>
    <!-- 实名购票开始 -->
    <%if(truebuy == "1"){%>
	<div class="sf-box">
	    <p><b class="red-pink" id="paperworktitle">${paperWorkTitle}</b></p>
		<span id="jsst">
		<p>您购票&nbsp;<span class="red-pink">${countNum}</span>&nbsp;张，需要填写&nbsp;<span class="red-pink">${identityNum}</span>&nbsp;张有效身份证件号码。</p>
		
		<div id="jsst_child" class="fl mr20">
		<%for(var i = 0;i< identityNum;i++){%>
			<select style="height:22px;" height="22" id="cardtype${i}">
				<%if(papersType == 0){%>
				<option value="10">二代身份证</option>
				<%}%>
				<%if(papersType == 1){%>
				<option value="20">护照</option>
				<%}%>			
				<%if(papersType == 2){%>
				<option value="10">二代身份证</option>
				<option value="20">护照</option>
				<%}%>
			</select>
			&nbsp;&nbsp;<input id="cardno${i}" type="text" value="" class="seatcardnumname" onfocus="seatOnfocus('${i}');" onblur="seatvalNo('${i}');" style="width:140px;height:20px;line-height:20px;padding:0 5px;">&nbsp;&nbsp;姓名：<input id="cardname${i}" type="text"  onchange="if(this.value.length==1){this.value=this.value.replace(/[^\u4e00-\u9FFF\u2022_a-zA-Z\.]/g,'')}else{this.value=this.value.replace(/[^\u4e00-\u9FFF\u2022_a-zA-Z\.]/g,'')}" onblur="seatvalName('${i}');" value="" style="width:140px;height:20px;line-height:20px;padding:0 5px; margin-right:10px"><span id="cardtypewarn${i}"><span class="red"></span></span><span id="seat${i}"></span><br>
		<%}%>
		</div>
		</span>
	</div>
    <div class="cb"></div>
    <%}%>
    <!-- 实名购票结束 -->
    <div class="orderSu re-personinfo orderSure-personinfo" id="expressAddress">
    <%if(addressFlag == 1){%>
    	 	<ul class="orderSure-address" id="cusAddress">
    	 	<%for(cusAdd in cusAdds){%>
    	 	<%if(cusAddLP.index==1){%>
    	 	<li class="select" aid="${cusAdd.addressidCustomersId}" >
	    		<input type="radio" id="address_${cusAddLP.index}" name="address" class="orderSure-address-input" checked="checked" value="${cusAdd.addressidCustomersId}" > 
	    		<label class="orderSure-addressa">
	    		${cusAdd.provinceName}
	    		${cusAdd.cityName}
	    		${cusAdd.areaName}
	    		${cusAdd.codeName}
	    		${cusAdd.name}
				</label>
	    		<span class="orderSure-addressb">${cusAdd.userName}</span>
	    		<span class="orderSure-addressc">${cusAdd.phone}&nbsp;&nbsp;&nbsp;&nbsp;${cusAdd.zip}</span>
	    		<span class="orderSure-addressd1" style="display: block;"><a href="javascript:void(0);" class="c5">默认地址 </a></span>
	    		<span class="orderSure-addresse undb" style="display: inline;"><a href="javascript:void(0);" class="c5" name="modifyAdd" onclick="return modifyAddress(${cusAdd.addressidCustomersId})">修改本地址</a></span>     
	        </li>
	        <%}%>
	        <%if(cusAddLP.index!=1){%>
	        <li aid="${cusAdd.addressidCustomersId}" class="">
	    		<input id="address_${cusAddLP.index}" type="radio" name="address" class="orderSure-address-input" value="${cusAdd.addressidCustomersId}" rel="0"> 
	    		<div>
	    		<label class="orderSure-addressa">
	    		${cusAdd.provinceName}
	    		${cusAdd.cityName}
	    		${cusAdd.areaName}
	    		${cusAdd.codeName}
	    		${cusAdd.name}
	    		</label>
	    		<span class="orderSure-addressb">${cusAdd.userName}</span>
	    		<span class="orderSure-addressc">${cusAdd.phone}&nbsp;&nbsp;&nbsp;&nbsp;${cusAdd.zip}</span>
	    		</div>
	    		<span class="orderSure-addressd1 undb" style="display: none;"><a href="javascript:void(0);" class="c5" onclick="setAddressByDefault(${cusAdd.addressidCustomersId});">设为默认地址</a></span>     
	    		<span class="orderSure-addresse undb" style="display: none;"><a href="javascript:void(0);" class="c5" onclick="modifyAddress(${cusAdd.addressidCustomersId});">修改本地址</a></span>
	        </li>
	        <%}%>
	        <%}%>
	        </ul>
    	<p class="orderSure-address-add"><a href="javascript:void(0)" onclick="addAddress();" class="orderSure-address-addbtn c5" id="addAddress">添加新收货地址</a></p>
   	<%}%>
   	</div>
   	<div class="orderSure-address-info" id="editCustomerAddr" style="display: none;">
   		<!-- 
   		<%if(addressFlag == 0){%>
   		<script type="text/javascript">
   			addAddress();
   		</script>
   		<%}%>
   		-->
   	</div>
   	<!-- 上门自取 -->
    <div class="orderSure-selfGet orderSure-personinfo undb">
    <%if(selfGetFlag == 1){%>
        <table class="orderSure-selfGet-tab">
        	<tr>
        		<td width="62">姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名：</td>
        		<td>
        			<input type="text" class="orderSure-input" id="doorUserName" name="doorUserName" style="width:130px;"  onchange="if(this.value.length==1){this.value=this.value.replace(/[^\u4e00-\u9FFF\u2022_a-zA-Z\.]/g,'')}else{this.value=this.value.replace(/[^\u4e00-\u9FFF\u2022_a-zA-Z\.]/g,'')}" />
        			<span id="selfGetNameTip"><span class="red">取票时请携带和所填姓名一致的身份证!</span></span>
        		</td>
        	</tr>
        	<tr>
        		<td>手&nbsp;&nbsp;机&nbsp;号：</td>
        		<td>
        			<input type="text" class="orderSure-input"  id="doorUserPhone" name="doorUserPhone" style="width:130px;" />
        			<span id="selfGetPhoneTip"><span class="red"></span></span>
        		</td>
        	</tr>
        	<tr>
        		<td height="40">取货地址：</td>
        		<td>${zqaddressEnd} <a href="http://www.228.com.cn/venues-map.html?zqaddress=${zqaddress}" class="blue ml10" target="_blank">[ 查看地图 ]</a></td>
        	</tr>
        	<tr>
        		<td height="20">取货时间：</td>
        		<td>${tFconfig.smzqsj}</td>
        	</tr>
        </table>
        <%}%>
    </div>
	<p class="orderSure-title">
    	<span>确认购买信息</span>
    </p>
    <div class="orderSure-orderDetail">
    	<p class="orderSure-cityname">发货城市：
    	<%if(filiale_name != null&& filiale_name != ""){%>
    		${filiale_name}
    	<%}else{%>
    		${cityName}
    	<%}%>
    	</p>
		<table class="buyCar-table" style="width:888px;margin-left:0;">
			<tr>
				<th width="280">商品信息</th>
				<th width="80">日期/场次</th>
				<th width="80">单价</th>
				<th width="80">优惠</th>
				<th width="80">数量</th>
				<th style="width:100px;_width:85px;">小计(元)</th>
				<%if(product.insured == 1){%>
				<th width="80" id="returnEnsured" style="display:none;">退票保险</th>
				<%}%>
			</tr>
			<%for(orders in orderDtlsList){%>
			<tr>
				<td class="buyCar-table-proinfo" style="text-align:left;">
					<span class="buyCar-table-proinfo-sp2" style="width:340px">
					<strong class="red">
					<%if(orders.status == 0){%>
						[售票中]
					<%}%>
					<%if(orders.status == 1){%>
						[预售]
					<%}%>
					</strong> 
					<a href="http://www.228.com.cn/ticket-${orders.productId}.html" class="c2" title="${orders.productName}">${orders.productName}</a><br /> 
					<a href="http://www.228.com.cn/venue-${orders.venuesId}.html" class="c2">[${orders.venuesName}]</a></span>
				</td>
				<td>${orders.playTime}</td>
				<td><span class="buyCar-table-nub">${orders.orgPrice}</span>元</td>
				<td>
				<%if(orders.disocunt > 0){%>
					${orders.disocunt}
				<%}else{%>
					无
				<%}%>
				</td>
				<td style="width:60px;">${orders.qty}</td>
				<td><span class="buyCar-table-nub">${orders.saleAmt}</span>元 </td>
				<%if(product.insured == 1 && isDifferTime == 0){%>
				<td class="font-taho insPrice" name="insPrice" style="display:none;">${orders.insuredAmt}</td>
				<%}%>
			</tr>
			<%}elsefor{%>
					暂无信息		 	
		 	<%}%>
			<tr>
				<td colspan="8" style="text-align:left;height:auto;padding-bottom:20px;">
					<div class="mt15 ml10" id="insuredDiv">
						<%if(product.insured == 1 && isDifferTime == 0){%>
						<span><input type="checkbox" id="insuredStatus" name="insuredStatus" value="0"/></span>
						<span class="orderSure-money-sp1">购买退票保险</span>
						<span class="ml20"><a href="http://www.228.com.cn/help/pswy.html" class="c5" target="_blank">什么是购买退票保险？</a></span>
						<%}%>
					</div>
					<%if(ifInvoiceInfo != 1 && ifInvoice == 1){%>
					<div class="mt15 ml10">
						<span><input type="checkbox" class="getTicket" id="getTicket" name="getTicket" value="1"/></span>
						<span class="orderSure-money-sp2">索取发票 </span>
					</div>
					<div class="orderSure-boma undb" id="isAskInvoice">
						<table>
							<tr id="f-company-inp">
								<td width="25"><input type="radio" checked="checked" name="ticketType" value="0"/></td>
								<td width="62" style="text-align: left;">个人</td>
								<td width="25"><input type="radio" name="ticketType" value="1"/></td>
								<td width="32">公司</td>
								<td style="padding:0;"><input type="text" class="orderSure-input" id="invoice" name="invoice" style="width:260px;color:#a5a5a5; display:none;" value="输入发票抬头" /></td>
							</tr>
						</table>
						<p class="mt5 red">提示：票品与发票存在不能同时配送的情况，我们将在发票开出后通知您。</p>
						<div class="orderSure-boma-dot"></div>
					</div>
					<%}%>
					<%if(ifInvoiceInfo == 1){%>
					<div class="mt15 ml10">
						<span><input type="checkbox" class="getTicket" id="getTicket" name="getTicket" value="1" checked="checked" disabled="disabled"/></span>
						<span class="orderSure-money-sp2">索取发票 </span>
					</div>
					<div class="orderSure-boma" id="isAskInvoice" height="12">
						<p  align='left' class='red'>提示:门票即为发票！</p>
					</div>					
					<%}%>
					<!-- STORY #2729::屏蔽下单时用户备注功能
					<div class="mt15 ml10">
						<span><input type="checkbox" class="ylquetion" id="ylquetion"/></span>
						<span class="orderSure-money-sp2">给永乐留言 </span>
					</div>
					<div class="orderSure-boma-area undb">
						<textarea id="message" name="message"style="width:408px;height:58px;color:#a5a5a5;">可以留下您对商品的其他要求，内容不超过30个字。</textarea>
					</div>
					 -->
				</td>
			</tr>
			<tr>
				<td colspan="8" style="text-align:left;height:auto;padding-bottom:20px;">
					<ul class="orderSure-money-total">
						<li class="orderSure-money-totala">
							<span class="fl ml10">级别：${customer.rank}会员
							<%if(customer.discount == 100){%>
							（无折扣）
							<%}else{%>
							（${customer.discount}折）
							<%}%>
							</span>     
							<span class="ml10">此单可获积分：${orderDtls.integralAmt}分</span>
						</li>
					</ul>
				</td>
			</tr>
		</table>
		
		<ul class="orderSure-money-total">
			<li class="orderSure-money-totalb"><strong>合计(含运费)：</strong>商品总金额：<span class="red fw" id="productPrice">${orderDtls.saleAmt}</span>元 + 运费：<span class="red fw" id="freight">0</span>元 + 保费：<span class="red fw" id="premium">0</span>元 = <span class="red fw" id="total">${orderDtls.saleAmt}</span>元</li>
		</ul>
    </div>
    
    <div class="pl30 mt20 clearfloat">
    	<table id="sendsty-tab">
    		<tr>
    			<td class="fw">选择支付方式：</td>
    			<td width="35"><input type="radio" name="sendSty1" checked="checked" rel="0" value="0"/></td>
    			<td class="orderSure-sendStyles-pad">在线支付</td>
    			<td width="35" class="cashOnDelivery" style="display:none;"><input type="radio" name="sendSty1" rel="1" value="1" id="hdfkInptRadio"/></td>
    			<td class="orderSure-sendStyles-pad cashOnDelivery" style="display:none;">货到付款</td>
    		</tr>
    	</table>
    </div>
    <div  id="con-all">
    	<div  class="pl30">
	    	<div class="pt10 fw">支付详情</div>
			<!-- 现金券start -->
			<%if(cashFlag == 1){%>
			<div class="mt15">
				<span><input type="checkbox" class="ticketuse" id="ticketuse"/></span>
				<span class="orderSure-money-sp2">使用现金券 </span>
				<span><label class="red pl20">提示：</label>现金券属一次性消费券，每次仅限使用一张，过期无效，不支持货到付款</span>
			</div>
			<div class="orderSure-money-ticket clearfloat" style="display:none">
				<%if(cashcouponList.~size != 0){%>
				<p class="orderSure-money-ticketa">您的现金券：</p>
				<div class="orderSure-money-ticketb">
					<table class="orderSure-money-ticketb-tab">
						<%for(cashcoupon in cashcouponList){%>
						<tr>
							<td width="23"><input type="radio" name="cashcouponid" value="${cashcoupon.PARVALUE}" cash="${cashcoupon.CASHCOUPONNO}"/></td>
							<td width="180">名称：${cashcoupon.CASHCOUPONNAME}</td>
							<td width="105">金额：<span class="red fw">${cashcoupon.PARVALUE}</span> 元</td>
							<td>有效期：${cashcoupon.endDate}</td>
						</tr>
		 				<%}%>
					</table>
				</div>
				<div class="cb"></div>
				<%}%>
				<div style="height:5px;_height:2px;overflow:hidden;"></div>
				<p class="orderSure-money-ticketa" style="margin-top:2px;*margin-top:5px;">使用现金券：</p>
				<div class="orderSure-money-ticketb">
				<table class="orderSure-money-ticketb-tab">
					<tr>
						<td>
							<input type="hidden" id="cashNo" name="cashCoupNo"/>
							<input type="text" class="orderSure-input" style="width:175px" id="cashCouponNo" name="cashCoupNo"/>
						</td>
						<td class="pl10">
							<a href="javascript:void(0);" class="orderSure-money-ticketb-submit" id="queryCashCoup"></a>
						</td>
						<td class="pl20">
							<div class="orderSure-money-ticketb-time" style="display:none;" id="cashCoupInfo" cash="">
							        金额：<span class="red fw" id="cashCoupMoney">0</span> 元   有效期：<span id="cashCoupEndDate"></span>
							   <div class="orderSure-money-ticketb-time-dot"></div>
						    </div>
						</td>
						<td class="pl10"  style="display:none;" id="useCashCoupSb">
							<a href="javascript:void(0);" class="orderSure-money-ticketb-use" id="useCashCoup" ></a>
						</td>
						<td><a href="javascript:void(0)" class="c5 ml20" id="cancelCashCoup" style="display:none;">取消</a></td>
						<td id="cashCoupTip" class="pl20"></td>
					</tr>
				</table>
				</div>
				<div class="orderSure-money-ticket-dot"></div>
			</div>
			<%}%>
			<%if(isRenewal == 1 && regPhone == 1 && regSafetyInfo == 1 && renewalFlag == 1){%>
			<p class="lhg25 mt10">您的预存款余额：<label class="red fw" id="cusRenewal">${customer.renewal}</label>元 &nbsp;&nbsp;本次支付金额： <input type="text" id="inputRenewal" name="renewal" class="orderSure-input mr5" style="width:50px;" value="0" onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')" />元 
			预存款密码：<input type="password" id="passwordRenewal" class="orderSure-input mr5" style="width:100px;" value="" /> 
			<span class="red"id="renewalMsg"></span></p>
			<%}%>			
    	</div>
		<div class="orderSure-line1"></div>
		<p class="orderSure-allTotal-money">应付款：<span class="orderSure-allTotal-moneya" id="dealWith">${orderDtls.saleAmt}</span> 元 </p>
		<div class="mt15 ml20 p10 fw" style="width:940px; background:#fafafa; border:1px solid #ededed; overflow:hidden;">
			<p class="fr">还需要支付总金额：<label class="red" id="endVal">${orderDtls.saleAmt}</label> 元</p>
			<p class="tc">商品已支付：<label class="red" id="alreadyVal">0</label> 元</p>
		</div>
		<!-- 支付区域开始 -->
		<div class="payNew-all">
				<div class="payNew-head">
					<p>选择支付方式</p>
				</div>
				<div class="payNew-all-block">
					<div class="payNew-style clearfix">
						<ul class="payNew-style-right" id="zidTabs" >
							<%if(cyberBankList != null && cyberBankList.~size != 0){%>
							<li tid="#idTab1" genre="1" tp="网上银行" name="pay_class" style="position:relative;zoom:1;overflow:visible;_overflow:hidden;">网上银行</li>
							<%}%>
							<%if(thirdPayList != null && thirdPayList.~size != 0){%>
							<li tid="#idTab2" genre="2" tp="在线支付" name="pay_class" style="position:relative;zoom:1;overflow:visible;_overflow:hidden;">支付平台</li>
							<%}%>
							<%if(leTKFalg == 1){%>
							<li tid="#idTab3" genre="3" tp="乐通卡" name="pay_class"  id="ltk">乐通卡</li>
							<%}%>
							<!--<li tid="#idTab4" genre="4" tp="银行转账" name="pay_class"  >银行转账</li>  -->
						</ul>
					</div>
					<div class="payNew-conts" >
						<div class="payNew-conts-show" id="payNew-conts-show">
						<%if(cyberBankList != null && cyberBankList.~size != 0){%>
							<div class="payNew-conts-showa">
							   <div style="border-bottom:1px dotted #ccc;margin-bottom:20px;width:800px;"></div>
							   <ul>
							   	<%for(cyberBank in cyberBankList){%>
							   	<li>
							   		<input type="radio" name="bank" value="${cyberBank.pay_discountDetailId}" id="pay_${cyberBank.pay_code}" />
							   		<img src="${cyberBank.picture_url}" title="${cyberBank.pay_type}" width="121" height="40" />
							   	</li>
							   	<%}%>	
							   </ul>
							</div>
							<%}%>	
							<%if(thirdPayList != null && thirdPayList.~size != 0){%>
							<div class="payNew-conts-showa undb">
								<ul>
								<%for(thirdPay in thirdPayList){%>
									<li>
										<input type="radio" name="bank" value="${thirdPay.pay_discountDetailId}" >
										<img src="${thirdPay.picture_url}" title="${thirdPay.pay_type}" width="121" height="40" />
									</li>
								<%}%>	
							   	</ul>
								<div class="payNew-conts-showa-dot" style="display:none;"></div>
							</div>
							<%}%>
							<%if(leTKFalg == 1){%>
							<div class="payNew-conts-showa undb" style="padding-left:40px;">
							<div class="payNew-conts-showa-t1">
							<table class="pay-xianj-tab">
									<tbody><tr>
										<td>乐通卡号：<input type="hidden" name="totalprice" id="totalprice" val="50"> </td>
										<td width="170">
											<input type="text" id="ltkno" name="ltkno" class="orderSure-input" style="width:140px;">
										</td>
										<td>密码：</td>
										<td width="160">
											<input type="password" id="ltkpwd" name="ltkpwd" class="orderSure-input" style="width:140px;">
										</td>
									</tr>
								</tbody>
								</table>
							<div class="payNew-conts-showa-dot payNew-conts-showa-dot1"></div>
							</div>
							<div class="payNew-conts-showa-t2">
								<p id="yl-ltk-info-default" class="red">
									<b class="info-warn" style="display:none">请输入正确的乐通卡号或密码</b>
									<b class="info-false" style="display:none;">乐通卡卡号或密码输入错误。</b>
								</p>
								<p id="yl-ltk-info-query" class="undb">
									<span class="fl">乐通卡号：<span id="yl-ltk-no">0000 0000 0000 0000</span></span>
									<span class="fl payNew-conts-showa-t2-sp2">余额：<span id="yl-ltk-price" class="red fw font-taho">0</span> 元</span>
									<span class="fl payNew-conts-showa-t2-sp3">
										<b id="yl-ltk-info-query-ok" class="info-true-r">可全额支付</b>
										<b id="yl-ltk-info-query-no" class="info-false" style="display:none;">卡内余额不足以全额支付本单，请使用其他方式支付。</b>
									</span>
								</p>
							</div>
							<div class="payNew-conts-showa-dot"  style="display:none;"></div>
							</div>
							<%}%>
							<!--
							<div class="payNew-conts-showa undb" style="padding-left:40px;">
								<div class="pay-yhzz-all clearfix">
									<dl class="pay-yhzz-dl">
										<dd class="pay-yhzz-dlb">
											<img src="" width="142" height="48" />
										</dd>
										<dd class="pay-yhzz-dlc">
											<ul>
												<li>永乐北京市分站</li>
												<li>开户行：招商银行</li>
												<li>账户名：永乐</li>
												<li class="font-taho">账&nbsp;&nbsp;&nbsp;号：</li>
											</ul>
										</dd>
									</dl>
									<dl class="pay-yhzz-dl">
										<dd class="pay-yhzz-dlb">
											<img src="" width="142" height="48" />
										</dd>
										<dd class="pay-yhzz-dlc">
											<ul>
												<li>永乐北京市分站</li>
												<li>开户行：招商银行</li>
												<li>账户名：永乐</li>
												<li class="font-taho">账&nbsp;&nbsp;&nbsp;号：</li>
											</ul>
										</dd>
									</dl>
								</div>
								<div class="payNew-blank-info">
									<p>为支付方便，请您尽量使用支付平台、网银直连或乐通卡支付。银行转账请在 2 小时内去银行办理。</p>
									<p>转账汇款手续所需资料：银行账户名称、账户、开户行。切记办理完汇款手续后到”我的永乐“里维护转账信息。<a href="${path }/help/yhhk.html" class="c5" target="_blank" >[查看永乐银行账户]</a></p>
								</div>
							</div>
							-->						
						</div>
					</div>
				</div>
		</div>
		<!-- 支付区域结束 -->
    </div>
    <div class="orderSure-allTotal-goto">
		<span class="orderSure-allTotal-gotoa"><a href="javascript:void(0)" class="orderSure-bom-submit"  id="saveOrder"></a></span>
		<span class="orderSure-allTotal-gotob"><input type="checkbox" id="iAgreeClause" name="iAgreeClause" value="1" checked="checked"/>&nbsp;&nbsp;我已阅读并同意 <a href="http://www.228.com.cn/about-fwtk.html" class="c5">永乐票务用户服务协议</a> <font id="returnTicketSureAgree" style="display: none;">和 <a href="http://www.228.com.cn/about-tpfwtk.html" class="c5">退票保险服务条款</a></font></span>
	</div>
	<div class="cb"></div>
	<!-- 提交前报错提示start  -->
	<div class="orderSure-error-msg" id="orderSureError" style="display:none;">
	    <ul class="orderSure-error-msg-ul">
	        <li class="orderSure-error-msg-ulli" id="errorMsg"></li>
	    </ul>      
	</div>
	<!-- 提交前报错提示end  -->
</div>
<!-- 浦发银行弹出层 start -->
<div class="blackbox" id="blackBox">
	<div id="pfBox" class="pfbank" style="display:none;">
		<a herf="javascrit:;" class="pfclosed-btn"></a>
		<!-- 协议页面 -->
		<div class="agreement-box common" id="agreementBox">
			<h2 class="agbox-title">上海浦东发展银行信用卡中心网关快捷支付业务客户服务协议</h2>
			<div class="agbox-con">
				<p>为明确双方的权利和义务，规范双方业务行为，甲方（持卡人）、乙方（上海浦东发展银行股份有限公司信用卡中心）本着平等互利的原则，就浦发信用卡快捷支付业务相关事宜达成本协议，以资共同遵守。</p>
				<p><strong>第一条 业务定义</strong></p>
				<p>下列用语在本协议中的含义为：<br/>
				“浦发信用卡快捷支付”指甲方已开通乙方信用卡网上支付的前提下，建立指定信用卡与乙方的签约关系，以指定信用卡为支付凭证，凭动态密码等验证要素在乙方合作商户网站、移动端、门店等渠道上完成资金划转的一种支付方式。<br/>
				“浦发信用卡快捷支付”的签约和使用渠道包括：计算机、移动终端等。<br/>
				“手机号码”指甲方在申请乙方信用卡时在乙方系统中预留的通知手机号码。<br/>
				</p>
				<p><strong>第二条 权利和义务</strong></p>
				<p>一、甲方应确保用于“浦发信用卡快捷支付”签约的信用卡为本人所有，保证在签约过程中提供的信息真实、准确、有效，确保支付行为合法并未侵犯任何第三方合法权益，否则因此造成乙方及其他第三人损失的，由甲方负责赔偿并承担全部法律责任。</p>
				<p>二、甲方在首次使用“浦发信用卡快捷支付”时，需提供以下信息用于身份验证，包括但不限于信用卡卡号、信用卡CVV2、手机动态验证码等，并同意将指定信用卡卡号与乙方建立签约关系。乙方保留变更上述信息作为验证标准的权利。</p>
				<p>三、“浦发信用卡快捷支付”签约成功后，甲方凭动态密码及辅助验证要素（由乙方确定）提交交易指令，乙方按交易指令从甲方签约信用卡上扣划资金。</p>
				<p>四、甲方应妥善保管信用卡卡号、信用卡有效期、信用卡CVV2、与之相关的证件类型及证件号码、手机号码、固定电话、通信地址等相关信息，如遗失信用卡或泄露上述相关信息，甲方应及时通知乙方并办理挂失或销户等相关手续，减少可能发生的损失。挂失或销户前的损失，以及非乙方原因泄露密码（包括但不限于信用卡查询密码、交易密码和手机动态密码等）、丢失信用卡等所致损失，由甲方自行承担。</p>
				<p>五、甲方不得利用“浦发信用卡快捷支付”业务进行套现、虚假交易、洗钱等行为，甲方有义务配合乙方进行相关调查。如若甲方拒绝配合进行相关调查或乙方认为存在或涉嫌虚假交易、洗钱、套现或任何其他非法活动、欺诈或违反诚信原则的行为、或违反本协议约定的，乙方有权采取以下一种、多种或全部措施：</p>
				<p>（1）暂停或终止提供本协议项下浦发信用卡快捷支付服务；</p>
				<p>（2）解除本协议；</p>
				<p>（3）对甲方签约信用卡（账户）进行中止支付处理。若因甲方的前述行为而给乙方造成损失的，甲方应负责赔偿并承担全部法律责任。</p>
				<p>六、乙方若因以下原因未执行甲方提交的交易指令，无须承担任何责任：</p>
				<p>（1）甲方签约信用卡信用额度不足。</p>
				<p>（2）甲方签约信用卡卡片状态异常。</p>
				<p>（3）甲方未能按照乙方的有关规定正确操作。</p>
				<p>（4）甲方的行为出于欺诈或其他非法目的。</p>
				<p><strong>第三条 不可抗力</strong></p>
				<p>对于由于乙方可控制范围以外的不可抗力因素（包括但不限于自然灾害、意外事故、战争系统故障、通讯故障等）以及监管部门政策变化等造成乙方无法或延后履行本协议的有关义务的，乙方不承担责任。</p>
				<p><strong>第四条 法律适用条款</strong></p>
				<p>本协议的成立、生效、履行、解释，均适用中华人民共和国法律（为本协议之目的，在此不包括香港特别行政区、澳门特别行政区和台湾地区法律）；法律无明文规定的，可适用通行的金融惯例。</p>
				<p>本协议是乙方的其他既有协议和约定的补充而非替代文件，如本协议与其他既有协议和约定有冲突，应以本协议为准。</p>
				<p><strong>第五条 差错和争议的解决</strong></p>
				<p>乙方仅为甲方提供安全可靠的支付结算服务，依据甲方提交的交易指令实施资金扣划。对于因购买商品或服务而产生的一切关于商品、服务及费用扣收的争议均由甲方与商户自行协商解决，乙方对此不承担任何责任。</p>
				<p>双方在履行本协议的过程中，如发生争议，应尽量协商解决。协商不成的，任何一方均应向乙方所在地有管辖权的人民法院提起诉讼。</p>
				<p><strong>第六条 协议的终止</strong></p>
				<p>乙方提供的服务受甲方签约信用卡状态的制约，如该卡由于挂失、止付、有效期到期等原因不能正常使用，相关服务自动中止。甲方签约信用卡（账户）状态恢复正常时，乙方重新提供相应服务。若甲方签约信用卡因换卡等原因发生卡号变更，则相关服务自动中止。如需延续服务，甲方须使用新卡号进行注册签约。</p>
				<p><strong>第七条 协议的效力和生效</strong></p>
				<p>本协议自甲方确认接受时刻即告成立并生效。</p>
				<p>乙方有权变更、暂停本协议项下浦发信用卡快捷支付业务服务，有权修改、终止本协议，并于执行前通过乙方网站或其他任何形式进行公告。相关公告一经发布即视为甲方已收到。甲方在乙方公告后继续办理浦发信用卡快捷支付业务的，视同已接受有关本协议、浦发信用卡快捷支付业务服务修改、变更的内容。</p>
				<p><strong>第八条 其他</strong></p>
				<p>本协议条款及其未尽事宜，仍同时受《上海浦东发展银行信用卡（个人卡）章程》与相关领用合约等文件约束。甲乙双方确认，在签署本协议前，已就全部条款进行了详细地说明和讨论，双方对合同的全部条款均无疑义，并对协议涉及的权利义务、责任限制及免责条款的法律含义有了准确无误的理解。</p>
			</div>
			<div class="radio-box">
				<span><input type="radio" checked="checked" name="agreement" value="1" id="agreementBtn"/>同意</span>
				<span><input type="radio" name="agreement" value="0"/>不同意</span>
			</div>
			<a href="javascript:;" class="agbox-sure-btn" id="firstSure">确认</a>
		</div>
		
		<!-- 签约引导页 -->
		<div class="qianyuebox common" id="qianyueBox" style="display:none;">
			<h1>您是否已签约支付？</h1>
			<p class="qy-p">
				<a href="javascript:;" class="qy-linka">已签约</a>
				<span>签约后无需输入更多信息，更方便更快捷</span>
			</p>
			<p class="qy-p">
				<a href="javascript:;" class="qy-linkb">未签约</a>
				<span>未签约用户需要填写银行信息</span>
			</p>
		</div>
		
		<!-- 已签约 -->
		<div class="no-surpotbox common" id="surpotbox" style="display:none;">
			<h2 class="no-surh2">
				<span>填写银行信息</span>
			</h2>
			<p class="no-surp">
				<label>银行卡号:</label>
				<input type="text" class="telinput" id="banknum" readonly="readonly" style="color:#999"/>
				<span class="errortext" id="errortext"></span>
			</p>
			<p class="no-surp">
				<label>验证码:</label>
				<input type="text" class="yzminput" value="验证码" id="yzmBox" onfocus="if(value=='验证码'){value='';this.style.color='#000'}" onblur="if(!value){value='验证码';this.style.color='#999'}" style="color:#999999"/>
				<input type="text" class="yzmbox" value="获取验证码" id="btn"/>
				<span class="errortext" id="errortext1"></span>
			</p>
			<p class="no-surp">若您不符合优惠条件将按订单全款扣除，优惠活动数量有限，先到先得</p>
			<p class="no-surpp">
				<a href="javascript:;" class="no-submit-btn" id="submitBtn">提交</a>
				<a href="javascript:;" class="no-close-btn">关闭</a>
				<a href="javascript:;" class="no-remove-btn">解除合约</a>
			</p>
		</div>
		<!-- 未签约 -->
		<div class="no-surpotbox common" id="no-surpotbox" style="display:none;">
			<h2 class="no-surh2">
				<span>填写银行信息</span>
			</h2>
			<p class="no-surp">
				<label>银行卡号:</label>
				<input type="text" class="telinput" id="banknumber" value="请填写浦发银行信用卡卡号" onfocus="if(value=='请填写浦发银行信用卡卡号'){value='';this.style.color='#000'}" onblur="if(!value){value='请填写浦发银行信用卡卡号';this.style.color='#999'}" style="color:#999999"/>
				<span class="errortext" id="errortext2"></span>
			</p>
			<p class="no-surp">
				<label>CVV2:</label>
				<input type="password" class="telinput" id="cvv2box" value="" style="color:#999999"/>
				<span class="errortext" id="errortext3"></span>
			</p>
			<!-- 
			<p class="no-surp">
				<label>手机号:</label>
				<input type="text" class="telinput" id="telnumber" value="请填写银行预留手机号" onfocus="if(value=='请填写银行预留手机号'){value='';this.style.color='#000'}" onblur="if(!value){value='请填写银行预留手机号';this.style.color='#999'}" style="color:#999999"/>
				<span class="errortext" id="errortext4"></span>
			</p>
			 -->
			<p class="no-surp">
				<label>验证码:</label>
				<input type="text" class="yzminput" id="yanzhengma" value="验证码" onfocus="if(value=='验证码'){value='';this.style.color='#000'}" onblur="if(!value){value='验证码';this.style.color='#999'}" style="color:#999999"/>
				<input type="text" class="yzmbox" value="获取验证码" id="btn1"/>
				<span class="errortext" id="errortext5"></span>
			</p>
			<p class="no-surp">请按要求填写真实信息，若您不符合优惠条件将按订单全款扣除，优惠活动数量有限，先到先得</p>
			<p class="no-surpp">
				<a href="javascript:;" class="no-submit-btn" id="noSubmitBtn">提交</a>
				<a href="javascript:;" class="no-close-btn">关闭</a> 
			</p>
		</div>
		
		<!-- 未签约提示 -->
		<div class="hint-box common" id="noHint" style="display:none;">
			<h2>您还未签约，请填写支付信息</h2>
			<p>
				<span>(5s)后自动跳转</span>
				<a href="#" class="writebtn" id="nowriteBox">填写</a>
			</p>
		</div>
		
		<!-- 解除签约 -->
		<div class="no-surpotbox common" id="jieyueBox" style="display:none;">
			<h2 class="no-surh2">
				<span>解除验证</span>
			</h2>
			<p class="no-surp">
				<label>银行卡号:</label>
				<input type="text" class="telinput" id="banknumb" readonly="readonly" style="color:#999"/>
				<span class="errortext" id="errortext6"></span>
			</p>
			<p class="no-surp">
				<label>CVV2:</label>
				<input type="password" class="telinput" id="telinput1" value=""  style="color:#999999"/>
				<span class="errortext" id="errortext7"></span>
			</p>
			<p class="no-surp">解除签约后，您购买商品后需要输入更多银行信息</p>
			<p class="no-surpp">
				<a href="javascript:;" class="no-submit-btn" id="nosubMit">解除签约</a>
				<a href="javascript:;" class="no-close-btn">取消</a> 
			</p>
		</div>
		
		<!-- 解除签约成功 -->
		<div class="hint-box common" id="hintBox" style="display:none;">
			<h2>解除签约成功！</h2>
			<p>
				(<span id="timer">5</span>s)后自动跳转</span>
				<a href="javascript:;" onclick="refresh();" class="writebtn">关闭</a>
			</p>
		</div>
		
		<!--信息错误  -->
		<div class="hint-box common" id="messageBox" style="display:none;width:230px;">
			<h2>您填写的信息不正确,请重新核对</h2>
			<p>
				(<span id="timer1"></span>s)后自动跳转</span>
				<a href="javascript:;" onclick="infoError();" class="writebtn" >填写</a>
			</p>
		</div>
		
	</div>
</div>
<!-- 浦发银行弹出层 end-->
<!-- 查看自取地址 start -->
<div class="lookaddress">
	<div class="lookaddress-a">
	       北京市东城区王家园胡同16号 儿童福利大厦7层  （周一至周日 9:00—18:00）
	   <div class="lookaddress-dot"></div>
	</div>
</div>
<script type="text/javascript">
	window.onload=function(){
		var W=document.documentElement.clientWidth||document.body.clientWidth;
		var H=document.documentElement.offsetHeight||document.body.offsetHeight;
		var radioBank=document.getElementById("pay_400");
		var blackBox=document.getElementById("blackBox");
		var innerBox=document.getElementById("pfBox");
		var h=innerBox.offsetHeight;
		var firstSure=document.getElementById("firstSure");
		var agreementBtn=document.getElementById("agreementBtn");
		var qianyueBox=document.getElementById("qianyuebox");
		var agreementBox=document.getElementById("agreement-box");
		
		if(H<1000){
			H=H+1550;
		}
		radioBank.onclick=function(){
			$("#payId").val("");
			//默认不选中单选框
			radioBank.checked=false;
			blackBox.style.width='100%';
			blackBox.style.height=H+"px";
			blackBox.style.display='block';
			innerBox.style.top=(H-300)/2+"px";//获取弹出层的top值
			innerBox.style.left=(W-494)/2+"px";//获取弹出层的left值
			innerBox.style.display='block'; 
			$(".pfclosed-btn").click(function(){
				$(".blackbox").hide();//最外层黑色半透明层隐藏
			});
			firstSure.onclick = function(){//判断radio是否为选中
				var checked = agreementBtn.checked;
				if(!checked){
					$(".blackbox").hide();
				}else{
				//查询是否永乐用户是否有绑定浦发卡
				var customerId = $("#customerId").val();
				var url = "${path}/ajax/getCardno?customerId="+customerId;
				$.ajax({
					type:"post",
					url:url,
					async: false,
					dataType:"text",
					jsonp: "callback",
					success:function(data){
						//用户绑定了浦发卡
						if(data){
						$("#bankcardno").val(data);
						var showcardno = card_style(data);
						$("#banknum").val(showcardno); //已签约银行卡号框
						$("#banknumb").val(showcardno); //未签约银行卡号框
						$("#agreementBox").hide();//当前显示box的关闭
						$("#surpotbox").show();//已签约盒子显示	
						}else{//用户未绑定浦发卡
						$("#agreementBox").hide();//当前显示box的关闭
						$("#no-surpotbox").show();//未签约盒子出现
						}
					},
					error:function(){
						$("#agreementBox").hide();//当前显示box的关闭
						$("#no-surpotbox").show();//未签约盒子出现
					}
					});					
					
				}
			};
			$(".pfbank div.common").hide();//所有内容隐藏
			$(".pfbank div.common").eq(0).show();//每次都是第一个页面显示
			$(".qy-linka").click(function(){//点击已签约按钮
				$(".qianyuebox").hide();//当前显示box的关闭
				$("#surpotbox").show();//已签约盒子显示	
			});
			$(".no-close-btn").click(function(){//点击关闭、取消按钮
				$(".blackbox").hide();//最外层黑色半透明层隐藏
			});	
			$(".no-remove-btn").click(function(){//点解解除合约按钮
				$("#surpotbox").hide();//当前显示box的关闭
				$("#jieyueBox").show();//解除签约盒子出现
			});
			$(".no-close-btn").click(function(){//点击关闭、取消按钮
					$(".qianyuebox").hide();//当前盒子关闭
			});				
			$(".qy-linkb").click(function(){//点击未签约按钮
				$(".qianyuebox").hide();//当前显示box的关闭
				$("#no-surpotbox").show();//未签约盒子出现
			});
			
			//银行卡号非空校验
			var text=document.getElementById("banknum");
			var errorBox=document.getElementById("errortext");
			text.onclick=function(){
				if(text.value==''){
					errorBox.innerHTML='请输入卡号';
					return false;
				}
			};
			//验证码非空校验
			var yanzheng=document.getElementById("yzmBox");
			var errorBox1=document.getElementById("errortext1");
			yanzheng.onclick=function(){
				if(yanzheng.value==''){
					errorBox1.innerHTML='请输入验证码';
					return false;
				}
			};
			//未签约银行卡号非空校验
			var banknumber=document.getElementById("banknumber");
			var errorBox2=document.getElementById("errortext2");
			banknumber.onclick=function(){
				if(banknumber.value==''){
					errorBox2.innerHTML='请输入卡号';
					return false;
				}
			};
			$("#banknumber").blur(function(){
  				if(banknumber.value!=''){
					errorBox2.innerHTML='';
					return false;
				}
			});
			//未签约cvv2非空校验
			var cvv2box=document.getElementById("cvv2box");
			var errorBox3=document.getElementById("errortext3");
			cvv2box.onclick=function(){
				if(cvv2box.value==''){
					errorBox3.innerHTML='请填写cvv2';
					return false;
				}
			};
			$("#cvv2box").blur(function(){
				if(cvv2box.value!=''){
					errorBox3.innerHTML='';
					return false;
				}
			});
			//未签约手机号非空校验
			var telnumber=document.getElementById("telnumber");
			var errorBox4=document.getElementById("errortext4");
			telnumber.onclick=function(){
				if(telnumber.value==''){
					errorBox4.innerHTML='请填写手机号';
					return false;
				}
			};
			//未签约验证码非空校验
			var yanzhengma=document.getElementById("yanzhengma");
			var errorBox5=document.getElementById("errortext5");
			yanzhengma.onclick=function(){
				if(yanzhengma.value==''){
					errorBox5.innerHTML='请输入验证码';
					return false;
				}
			};
			//解除签约银行卡号非空校验
			var banknumb=document.getElementById("banknumb");
			var errorBox6=document.getElementById("errortext6");
			banknumb.onclick=function(){
				if(banknumb.value==''){
					errorBox6.innerHTML='请输入卡号';
					return false;
				}
			};
			//解除签约CVV2非空校验
			var telinput1=document.getElementById("telinput1");
			var errorBox7=document.getElementById("errortext7");
			telinput1.onclick=function(){
				if(telinput1.value==''){
					errorBox7.innerHTML='请填写cvv2';
					return false;
				}
			};
		};
		$("#nosubMit").click(function(){// 点击解除签约按钮弹出解除签约弹框
			//解约
				var bank_cardno = $("#bankcardno").val();
				var cvv2 = $("#telinput1").val();
				var customerId = $("#customerId").val();
				if ($.trim(bank_cardno)==""||isNaN(bank_cardno)) {//银行卡号
					return false;
				}
				if($.trim(cvv2)==""){//cvv2
					$("#errortext7").html("cvv2不能为空");
					$("#errortext7").show();
					return false;
				}else if(isNaN(cvv2)){
					$("#errortext7").html("cvv2不正确");
					$("#errortext7").show();
					return false;
				}
				var url = "${path}/ajax/toSignSPDB?bank_cardno="+bank_cardno+"&cvv2="+cvv2+"&signingFlag=2&customerId="+customerId;
				$.ajax({
					type:"post",
					url:url,
					async: false,
					dataType:"text",
					jsonp: "callback",
					success:function(data){
						if(data == "0000" || data == "030099" || data == "030098"){//解约成功
							$("#jieyueBox").hide();//当前显示box的关闭
							$("#hintBox").show();//带倒计时的解除签约成功盒子出现
							run();
						}else if(data == "030095" ||data == "030096"){//签约失败
							alert("cvv2不正确");
						}else{//解约失败
							document.getElementById("timer1").innerHTML = "5";
							$("#jieyueBox").hide();
							$("#messageBox").show();//带倒计时的解除签约成功盒子出现
							var run1 = window.setInterval("run1();", 1000);
							$("#run1").val(run1);
						}
					},
					error:function(){

					}
					});
				
			});
			$("#writeb").click(function(){//点击填写弹出未签约的弹层
				$("#messageBox").hide();//当前显示box的关闭
				$("#no-surpotbox").show();////未签约盒子出现
			});
			$("#submitBtn").click(function(){//已签约中的提交按钮
				var bank_cardno = $("#bankcardno").val();
				var code = $("#yzmBox").val();
				if ($.trim(bank_cardno)=="") {//银行卡号
					$("#errortext").html("卡号不能为空");
					$("#errortext").show();
					return false;
				}else if(isNaN(bank_cardno)) {
					$("#errortext").html("卡号不正确");
					$("#errortext").show();
					return false;					
				}else{
					$("#errortext").html("");
					$("#errortext").hide();
				}
				if ($.trim(code)==""){//验证码
					$("#errortext1").html("请输入验证码");
					$("#errortext1").show();
					return false;
				}else if(isNaN(code)){
					$("#errortext1").html("验证码不正确");
					$("#errortext1").show();
					return false;				
				}else{
					$("#errortext1").html("");
					$("#errortext1").hide();
				}
				//提交选中单选框
				document.getElementById("pay_400").checked=true;
				$("#payId").val($("#pay_400").val());
				$("#errorurl").val("http://www.228.com.cn/nqt/common/errorMsg?code=3");
				$("#bankcardno").val(bank_cardno);
				$("#verifycode").val(code);
				$("#surpotbox").hide();//当前显示box的关闭
				$(".blackbox").hide();//最外层黑色半透明层隐藏
			});
			$("#nowriteBox").click(function(){//点击签约提示填写
				$("#noHint").hide();//当前显示box的关闭
				$("#no-surpotbox").show();////未签约盒子出现
			});
			$("#noSubmitBtn").click(function(){//未签约中的提交按钮
				var bank_cardno = $("#banknumber").val();
				var cvv2 = $("#cvv2box").val();
				var code = $("#yanzhengma").val();
				var customerId = $("#customerId").val();
				if ($.trim(bank_cardno)=="") {//银行卡号
					$("#errortext2").html("卡号不能为空");
					$("#errortext2").show();
					return false;
				}else if(isNaN(bank_cardno)){
					$("#errortext2").html("卡号不正确");
					$("#errortext2").show();
					return false;
				}else{
					$("#errortext2").html("");
					$("#errortext2").hide();
				}
				if($.trim(cvv2)==""){//cvv2
					$("#errortext3").html("CVV2不能为空");
					$("#errortext3").show();
					return false;
				}else if(isNaN(cvv2)){
					$("#errortext3").html("CVV2不正确");
					$("#errortext3").show();
					return false;
				}else{
					$("#errortext3").html("");
					$("#errortext3").hide();
				}
				if ($.trim(code)==""){//验证码
					$("#errortext5").html("请输入验证码");
					$("#errortext5").show();
					return false;
				}else if(isNaN(code)){
					$("#errortext5").html("验证码不正确");
					$("#errortext5").show();
					return false;
				}else{
					$("#errortext5").html("");
					$("#errortext5").hide();				
				}
				var url = "${path}/ajax/toSignSPDB?bank_cardno="+bank_cardno+"&cvv2="+cvv2+"&signingFlag=1&customerId="+customerId;
				$.ajax({
					type:"post",
					url:url,
					async: false,
					dataType:"text",
					jsonp: "callback",
					success:function(data){
						if(data == "0000" || data =="030089"){//签约成功
							//提交选中单选框
							document.getElementById("pay_400").checked=true;
							$("#bankcardno").val(bank_cardno);
							$("#verifycode").val(code);
							$("#pfBox").hide();//当前显示box的关闭
							$(".blackbox").hide();//最外层黑色半透明层隐藏
							$("#errorurl").val("http://www.228.com.cn/nqt/common/errorMsg?code=3");
							$("#payId").val($("#pay_400").val());
							alert("签约成功，请点击支付");
						}else if(data == "030095" ||data == "030096"){//签约失败
							alert("cvv2不正确");
						}else if(data == "0"){
							alert("签约失败，已有用户绑定该卡");
						}else{
							alert("签约失败，请检查填写的信息");
						}
					},
					error:function(){

					}
					});
			});
			//未签约获取验证码
			$("#btn").click(function(){
				var bank_cardno = $("#bankcardno").val();
				if ($.trim(bank_cardno)==""||isNaN(bank_cardno)) {//银行卡号
					return false;
				}
				time(this);
				var url = "${path}/ajax/getCodeSPDB?bank_cardno="+bank_cardno;
				$.ajax({
					type:"post",
					url:url,
					dataType:"text",
					jsonp: "callback",
					success:function(data){
						if(data == "0000"){
							//alert("验证码已经发送");
						}else{
							//验证码发送失败
						}
					},
					error:function(){

					}
					});
			});
			//已签约获取验证码
			$("#btn1").click(function(){//点击签约提示填写
				var bank_cardno = $("#banknumber").val();
				var cvv2 = $("#cvv2box").val();
				if ($.trim(bank_cardno)=="" ||isNaN(bank_cardno)) {//银行卡号
					$("#errortext2").html("请输入卡号");
					$("#errortext2").show();
					return false;
				}
				time(this);
				var url = "${path}/ajax/getCodeSPDB?bank_cardno="+bank_cardno;
				$.ajax({
					type:"post",
					url:url,
					dataType:"text",
					jsonp: "callback",
					success:function(data){
						if(data == "0000"){
							//alert("验证码已经发送");
						}else{
							//验证码发送失败
						}
					},
					error:function(){

					}
					});
			});
	};
	//跳转倒计时
	function run(){
	    var s = document.getElementById("timer");
	    if(s.innerHTML == 0){
	       	window.location.reload();//需要跳转的页面地址
	        return false;
	    }
	    s.innerHTML = s.innerHTML * 1 - 1;
	    window.setInterval("run();", 1000);
	}
	//跳转倒计时1
	function run1(){
	    var s = document.getElementById("timer1");
	    if(s.innerHTML == 0){
	    	window.clearInterval($("#run1").val());
	    	//重新输入解约信息
	       	infoError();
	        return false;
	    }
	    s.innerHTML = s.innerHTML * 1 - 1;
	    
	}
	//获取验证码倒计时
	var wait=60;
	function time(o) {
	    if (wait == 0) {
	        o.removeAttribute("disabled");  
	        o.value="重新获取";
	        wait = 60;
	        }else {
	            o.setAttribute("disabled", true);
	            o.value="倒计时(" + wait + "s)";
	            wait--;
	        setTimeout(function() {
	        time(o)
	        },1000)
	      }
 	}
 	//处理银行卡号格式
 	function card_style(str){
 		var str_end;
 		if(str!=null && str!="" && str!=undefined){
 			var str_before = "";
 			var str_after = str.substring(str.length-4,str.length);
 			for (var i = 0; i < str.substring(0,str.length-4).length; i++) {
				str_before += "*";
			}
			str_end = str_before+str_after;
 		}else{
 			str_end = str;
 		}
 		return str_end;
 	}
 	
</script>
<script>
	function seatOnfocus(num){
		var cardtype = $("div#jsst_child select#cardtype"+num).val();
		if(cardtype==10){
			  $("#cardtypewarn"+num).html("<span class='red'>请输入正确的身份证号，现场换票/验票需要出示身份证件原件。</span>");
		}else{
			  $("#cardtypewarn"+num).html("<span class='red'>请输入正确的护照号，现场换票/验票需要出示身份证件原件。</span>");
		}
	}
	//验证证件号
	function seatvalNo(num){
		var productId = $("#productid").val();
		var num = num;
		var cardtype = $("div#jsst_child select#cardtype"+num).val();
		var cardno = $("div#jsst_child input#cardno"+num).val();
		var seatinfo = $("div#jsst_child span#seat"+num).text();
        var url = "${path}/ajax/findCardnoisExistNew?productId="+productId+"&cardno="+cardno+"&cardtype="+cardtype;
		$.ajax({
			type:"post",
			url:url,
			dataType:"json",
			success:function(data){
				if(data.flag == 0){
        			$("#cardtypewarn"+num).html("<span class='red'>"+data.msg+"</span>");
        			return false;
        		}else{
        			$("#cardtypewarn"+num).html("");
        		}
			},
			error:function(){
				return false;
			}
			});
	}
	//验证证件名字
	function seatvalName(num){
		var num = num;
		var cardtype = $("div#jsst_child select#cardtype"+num).val();
		var cardname = $("div#jsst_child input#cardname"+num).val();
        if($.trim(cardname) == ""){
          $("#cardtypewarn"+num).html("<span class='red'>姓名不能为空!</span>");
          return false;       
        }else if(verifyName(cardname) != 0){
          $("#cardtypewarn"+num).html("<span class='red'>姓名格式错误!</span>");
          return false;
        }else{
          $("#cardtypewarn"+num).html("");
        }
	}
	//-----------------------------------验证证件号开始---------------------------------------------------------//
	//验证身份证
	function validateCard(card){
		var str = card;
		var City = {11:"\u5317\u4eac", 12:"\u5929\u6d25", 13:"\u6cb3\u5317", 14:"\u5c71\u897f", 15:"\u5185\u8499\u53e4", 21:"\u8fbd\u5b81", 22:"\u5409\u6797", 23:"\u9ed1\u9f99\u6c5f ", 31:"\u4e0a\u6d77", 32:"\u6c5f\u82cf", 33:"\u6d59\u6c5f", 34:"\u5b89\u5fbd", 35:"\u798f\u5efa", 36:"\u6c5f\u897f", 37:"\u5c71\u4e1c", 41:"\u6cb3\u5357", 42:"\u6e56\u5317 ", 43:"\u6e56\u5357", 44:"\u5e7f\u4e1c", 45:"\u5e7f\u897f", 46:"\u6d77\u5357", 50:"\u91cd\u5e86", 51:"\u56db\u5ddd", 52:"\u8d35\u5dde", 53:"\u4e91\u5357", 54:"\u897f\u85cf ", 61:"\u9655\u897f", 62:"\u7518\u8083", 63:"\u9752\u6d77", 64:"\u5b81\u590f", 65:"\u65b0\u7586", 71:"\u53f0\u6e7e", 81:"\u9999\u6e2f", 82:"\u6fb3\u95e8", 91:"\u56fd\u5916 "};
		var iSum = 0;
		var cardFlag = 0;
		str = str.replace("\uff38", "X");
		str = str.replace("x", "X");
		if (str.length == 0 ){
			return cardFlag = 1;
   		}
		if (!/^\d{17}(\d|x)$/i.test(str)) {
			return cardFlag = 2;
		}
		str = str.replace(/x$/i, "a");
		if (City[parseInt(str.substr(0, 2))] == null) {
			return cardFlag = 2;
		}
		sBirthday = str.substr(6, 4) + "-" + Number(str.substr(10, 2)) + "-" + Number(str.substr(12, 2));
		var d = new Date(sBirthday.replace(/-/g, "/"));
		if (sBirthday != (d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate())) {
			return cardFlag = 2;
		}
		for (var i = 17; i >= 0; i--) {
			iSum += (Math.pow(2, i) % 11) * parseInt(str.charAt(17 - i), 11);
		}
		if (iSum % 11 != 1) {
			return cardFlag = 2;
		}
		return cardFlag;
	}
	//验证护照号
	function validatePersonCard(card){
		var cardFlag = 0;//设置护照验证标识
		var cardVal = card;
		//护照正则表达式
		isIDCard=/(^[A-Za-z0-9]+$)/;
		if($.trim(cardVal)==""){//非空
			cardFlag = 1;
    	}else if(!isIDCard.test(cardVal)){
			cardFlag = 2;
		}
		return cardFlag;
	}
	//刷新
	function refresh(){
		window.location.reload()
	} 
	function infoError(){
		window.clearInterval($("#run1").val());
		$("#jieyueBox").show();
		$("#messageBox").hide();
	} 
</script>

<script>
(function(){
	var aBtn=document.getElementById('zidTabs').children;
	var aCon=document.getElementById('payNew-conts-show').children;
	
	for(var i=0; i<aBtn.length; i++)
	{
		aBtn[i].index=i;
		aBtn[i].onclick=function(){
			for(var i=0; i<aBtn.length; i++)
			{
				aBtn[i].className="";
				aCon[i].className="payNew-conts-showa undb";
			}
			this.className="select";
			aCon[this.index].className="payNew-conts-showa";
			
		};
	}
})();
(function(){
	var aBtn=document.getElementById('sendsty-tab').getElementsByTagName('input');
	var oCon=document.getElementById('con-all')
	
	aBtn[0].onclick=function(){
		if(aBtn[0].checked==true)
		{
			oCon.style.display="block";
		}
	};
	aBtn[1].onclick=function(){
		if(aBtn[1].checked==true)
		{
			oCon.style.display="none";
		}
	};
	
})();
(function(){
	var aBtn=document.getElementById('f-company-inp').getElementsByTagName('input');
	
	aBtn[0].onclick=function(){
		if(aBtn[0].checked==true)
		{
			aBtn[2].style.display="none";
		}
	};
	aBtn[1].onclick=function(){
		if(aBtn[1].checked==true)
		{
			aBtn[2].style.display="block";
		}
	};
	
})();
</script>
<!-- 引入footer -->
<%include("/common/footer.html",{}){}%>
<!-- 引入公共js资源 -->
<%include("/common/bottom.html",{}){}%>	
</body>
</html>
